package demo;

import com.sun.jna.Library;
import com.sun.jna.Native;

public class JnaExample {
    public interface MyCppLibrary extends Library {
        int add(int a, int b);
    }

    public static void main(String[] args) {
        MyCppLibrary myCppLibrary = (MyCppLibrary) Native.load("example.dll", MyCppLibrary.class);
        int result = myCppLibrary.add(3, 4);
        System.out.println("3 + 4 = " + result);
    }
}